/* 企业官网设计系统 - 统一样式配置 */

/* 主色调配置 */
:root {
  /* 主品牌色 - 蓝色系 */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  
  /* 辅助色 - 紫色系 */
  --secondary-50: #faf5ff;
  --secondary-100: #f3e8ff;
  --secondary-200: #e9d5ff;
  --secondary-300: #d8b4fe;
  --secondary-400: #c084fc;
  --secondary-500: #a855f7;
  --secondary-600: #9333ea;
  --secondary-700: #7c3aed;
  --secondary-800: #6b21a8;
  --secondary-900: #581c87;
  
  /* 强调色 - 橙色系 */
  --accent-50: #fff7ed;
  --accent-100: #ffedd5;
  --accent-200: #fed7aa;
  --accent-300: #fdba74;
  --accent-400: #fb923c;
  --accent-500: #f97316;
  --accent-600: #ea580c;
  --accent-700: #c2410c;
  --accent-800: #9a3412;
  --accent-900: #7c2d12;
  
  /* 中性色 */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* 语义色 */
  --success-500: #10b981;
  --warning-500: #f59e0b;
  --error-500: #ef4444;
  --info-500: #3b82f6;
  
  /* 间距系统 */
  --spacing-xs: 0.5rem;   /* 8px */
  --spacing-sm: 0.75rem;  /* 12px */
  --spacing-md: 1rem;     /* 16px */
  --spacing-lg: 1.5rem;   /* 24px */
  --spacing-xl: 2rem;     /* 32px */
  --spacing-2xl: 3rem;    /* 48px */
  --spacing-3xl: 4rem;    /* 64px */
  --spacing-4xl: 6rem;    /* 96px */
  --spacing-5xl: 8rem;    /* 128px */
  
  /* 圆角系统 */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-3xl: 2rem;     /* 32px */
  
  /* 阴影系统 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* 字体系统 */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  --font-size-6xl: 3.75rem;   /* 60px */
  
  /* 动画时长 */
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  
  /* Z-index 层级 */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* 通用组件样式 */

/* 按钮样式 */
.btn-primary {
  @apply bg-gradient-to-r from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700;
  @apply text-white font-semibold px-6 py-3 rounded-xl;
  @apply shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30;
  @apply transform hover:scale-105 transition-all duration-300;
  @apply border-0 focus:ring-4 focus:ring-primary-200;
}

.btn-secondary {
  @apply bg-gradient-to-r from-secondary-500 to-secondary-600 hover:from-secondary-600 hover:to-secondary-700;
  @apply text-white font-semibold px-6 py-3 rounded-xl;
  @apply shadow-lg shadow-secondary-500/25 hover:shadow-xl hover:shadow-secondary-500/30;
  @apply transform hover:scale-105 transition-all duration-300;
  @apply border-0 focus:ring-4 focus:ring-secondary-200;
}

.btn-outline {
  @apply border-2 border-primary-500 text-primary-600 hover:bg-primary-500 hover:text-white;
  @apply font-semibold px-6 py-3 rounded-xl;
  @apply transition-all duration-300;
  @apply focus:ring-4 focus:ring-primary-200;
}

/* 卡片样式 */
.card-primary {
  @apply bg-white rounded-2xl shadow-lg hover:shadow-xl;
  @apply border border-gray-100 hover:border-primary-200;
  @apply transition-all duration-300;
  @apply overflow-hidden;
}

.card-hover {
  @apply transform hover:scale-105 hover:-translate-y-2;
  @apply transition-all duration-300;
}

/* 渐变背景 */
.bg-gradient-primary {
  @apply bg-gradient-to-br from-primary-50 via-white to-secondary-50;
}

.bg-gradient-secondary {
  @apply bg-gradient-to-br from-secondary-50 via-white to-primary-50;
}

.bg-gradient-accent {
  @apply bg-gradient-to-br from-accent-50 via-white to-primary-50;
}

/* 文字渐变 */
.text-gradient-primary {
  @apply bg-gradient-to-r from-primary-600 to-secondary-600 bg-clip-text text-transparent;
}

.text-gradient-accent {
  @apply bg-gradient-to-r from-accent-600 to-primary-600 bg-clip-text text-transparent;
}

/* 动画效果 */
.hover-glow {
  @apply transition-all duration-300;
}

.hover-glow:hover {
  @apply shadow-2xl;
  filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
}

.hover-scale {
  @apply transform transition-transform duration-300;
}

.hover-scale:hover {
  @apply scale-105;
}

.fade-in {
  @apply opacity-0 translate-y-8;
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    @apply opacity-100 translate-y-0;
  }
}

/* 响应式容器 */
.container {
  @apply max-w-7xl mx-auto px-4 sm:px-6 lg:px-8;
}

.container-sm {
  @apply max-w-4xl mx-auto px-4 sm:px-6 lg:px-8;
}

.container-xs {
  @apply max-w-2xl mx-auto px-4 sm:px-6 lg:px-8;
}

/* 分割线 */
.divider {
  @apply w-24 h-1 bg-gradient-to-r from-primary-500 to-secondary-500 mx-auto rounded-full;
}

.divider-lg {
  @apply w-32 h-1.5 bg-gradient-to-r from-primary-500 to-secondary-500 mx-auto rounded-full;
}

/* 标题样式 */
.heading-primary {
  @apply text-4xl md:text-5xl lg:text-6xl font-bold text-gradient-primary;
  @apply tracking-tight leading-tight;
}

.heading-secondary {
  @apply text-3xl md:text-4xl lg:text-5xl font-bold text-gray-800;
  @apply tracking-tight leading-tight;
}

.heading-tertiary {
  @apply text-2xl md:text-3xl lg:text-4xl font-bold text-gray-800;
  @apply tracking-tight leading-tight;
}

/* 段落样式 */
.text-lead {
  @apply text-lg md:text-xl text-gray-600 leading-relaxed;
}

.text-body {
  @apply text-base text-gray-600 leading-relaxed;
}

/* 网格布局 */
.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.grid-auto-fill {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* 特殊效果 */
.glass-effect {
  @apply bg-white/80 backdrop-blur-md border border-white/20;
}

.gradient-border {
  position: relative;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, var(--primary-500), var(--secondary-500)) border-box;
  border: 2px solid transparent;
  border-radius: 1rem;
}

/* 加载动画 */
.loading-pulse {
  @apply animate-pulse bg-gray-200 rounded;
}

/* 滚动条样式 */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-300) var(--gray-100);
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--primary-300);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--primary-400);
}

/* 媒体查询辅助类 */
@media (max-width: 640px) {
  .mobile-hidden {
    display: none;
  }
}

@media (min-width: 641px) {
  .mobile-only {
    display: none;
  }
}

/* 打印样式 */
@media print {
  .print-hidden {
    display: none;
  }
}

/* 无障碍支持 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 焦点样式 */
.focus-visible {
  @apply focus:outline-none focus:ring-4 focus:ring-primary-200 focus:ring-opacity-50;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .card-primary {
    @apply border-2 border-gray-800;
  }
  
  .btn-primary {
    @apply bg-primary-700 border-2 border-primary-800;
  }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-50: #1f2937;
    --gray-100: #374151;
    --gray-200: #4b5563;
    --gray-300: #6b7280;
    --gray-400: #9ca3af;
    --gray-500: #d1d5db;
    --gray-600: #e5e7eb;
    --gray-700: #f3f4f6;
    --gray-800: #f9fafb;
    --gray-900: #ffffff;
  }
  
  .card-primary {
    @apply bg-gray-800 border-gray-700;
  }
  
  .text-body {
    @apply text-gray-300;
  }
}